<template>
  <view class="base-page">
    <globalNavBar title="场馆简介"/>
    <view class="priefly">
      <view class="banner">
        <uv-swiper :list="bannerList" height="224px"/>
      </view>
      <view class="content">
        <view class="info">
          <view class="btn">场馆简介</view>
        </view>
        <view class="title">{{ currentTitle }}</view>
        <view class="text" v-html="currentText"></view>
      </view>
    </view>
  </view>
</template>

<script>
	import http from '@/utils/request.js'
	
export default {
  data() {
    return {
      bannerList: [

      ],
      current: 1,
      total: 3,
      currentText: '',
      currentTitle: '',
    }
  },
  computed: {

  },
  onLoad() {
	this.getInfo();
  },
  methods: {
    SwiperChange(e) {
      this.current = e.current + 1
      const {text, title} = this.bannerList[e.current]
      this.currentText = text
      this.currentTitle = title
    },
	getInfo(){
		var that = this;
		http.post('api/article/venue_desc',{}).then(function(data){
			that.currentTitle = data.data.title;
			that.currentText = data.data.maincontent
			let images = data.data.images.split(',');
			for(let i = 0;i<images.length;i++){
				that.bannerList.push({
					url:http.common.baseUri+images[i]
				})
			}

		})
	}
  }
}
</script>

<style lang="scss" scoped>
.priefly {
  width: 100%;

  .banner {
    position: sticky;
    top: 0;
  }

  .content {
    width: calc(100% - 120rpx);
    padding: 0 60rpx;
    transform: translateY(-16rpx);
    border-top-right-radius: 16rpx;
    border-top-left-radius: 16rpx;
    overflow: hidden;
    background-color: #fff;

    .info {
      margin-top: 30rpx;
      width: 100%;
      @include flex(row, space-between, center);

      .btn {
        width: 188rpx;
        height: 48rpx;
        border-radius: 24rpx;
        background-color: #3f9ef8;
        @include flex(row, center, center);
        font-size: 22rpx;
        color: #fff;
      }

      .num {
        font-size: 26rpx;
        color: #737373;

        text {
          color: #6e2328;
        }
      }
    }

    .title {
      margin-top: 42rpx;
      font-size: 36rpx;
      font-weight: bold;
      text-align: center;
      color: #242424;
    }

    .text {
      margin-top: 36rpx;
      padding-top: 40rpx;
      border-top: 1px solid #dcdcdc;
    }
  }
}
</style>
